package edu.zqu.instructionalMatters.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.zqu.instructionalMatters.project.entity.CurriculumResult;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author 何文东
 * @Date 2020-07-03
 * @Description: 课表执行结果 - Mapper 接口
 * @Version 1.0
 */
public interface CurriculumResultMapper extends BaseMapper<CurriculumResult> {
    @Select("<script>" + "select * from curriculum_result where college_id = #{collegeId} " +
            " <if test = 'schoolId != null'>" +
            " and school_id = #{schoolId}" +
            " </if>" +
            " <if test = 'curriculumId != null'>" +
            " and curriculum_id = #{curriculumId}" +
            " </if>" +
            " <if test = 'statusId != null'>" +
            " and status_id = #{statusId}" +
            " </if>" +
            "</script>")
    public List<CurriculumResult> findAll(CurriculumResult curriculumResult);
}
